{% extends "base.html" %}

{% block content %}
<div class="container mt-4">
    <h2>编辑存款类型</h2>
    <form method="POST">
        <div class="mb-3">
            <label for="saving_name" class="form-label">类型名称</label>
            <input type="text" class="form-control" id="saving_name" 
                   name="saving_name" value="{{ deposit_type.savingName }}" required>
        </div>
        <div class="mb-3">
            <label for="interest_rate" class="form-label">利率(%)</label>
            <input type="number" step="0.01" class="form-control" id="interest_rate" 
                   name="interest_rate" value="{{ deposit_type.interestRate }}" required>
        </div>
        <div class="mb-3">
            <label for="description" class="form-label">描述</label>
            <textarea class="form-control" id="description" name="description" rows="3">
                {{ deposit_type.description }}
            </textarea>
        </div>
        <button type="submit" class="btn btn-primary">保存</button>
        <a href="{{ url_for('admin_deposit_types') }}" class="btn btn-secondary">取消</a>
    </form>
</div>
{% endblock %}